<?php

use think\migration\Migrator;

class CurlRequestLog extends Migrator
{
    public function up()
    {
        $sql = <<<SQL
CREATE TABLE `curl_request_log` (
  `id` int PRIMARY KEY AUTO_INCREMENT comment '自增id',
  `url` text DEFAULT NULL COMMENT '请求地址',
  `request` MEDIUMTEXT DEFAULT NULL COMMENT '请求数据',
  `response` MEDIUMTEXT DEFAULT NULL COMMENT '响应数据',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='curl get/post 请求日志';
SQL;

        $this->execute($sql);
    }
    public function down()
    {
        $this->dropTable('curl_request_log');
    }
}
